
package entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 *
 * @author Rohmad Raharjo
 */
public class User implements Serializable{
    private Integer id;
    private String name;
    private String username;
    private String password;
    private String accesssLevel;
    private Date lastLogin;
    private Date create;
    private Date lastUpdate;

   
    

    public User() {
        id = new Integer(0);
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getLastLogin() {
        return lastLogin;
    }

    public void setLastLogin(Date lastLogin) {
        this.lastLogin = lastLogin;
    }
     public String getAccesssLevel() {
        return accesssLevel;
    }

    public void setAccesssLevel(String accesssLevel) {
        this.accesssLevel = accesssLevel;
    }

    public Date getCreate() {
        return create;
    }

    public void setCreate(Date create) {
        this.create = create;
    }

    public Date getLastUpdate() {
        return lastUpdate;
    }

    public void setLastUpdate(Date lastUpdate) {
        this.lastUpdate = lastUpdate;
    }
    
    @Override
    public boolean equals(Object o) {
        return Objects.equals(this.id, ((User)o).getId());
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 29 * hash + Objects.hashCode(this.id);
        return hash;
    }
    
    
}
